package cn.itcast.com.homework.day811;

import java.util.ArrayList;
import java.util.Collection;

/*
用Collection存储自定义对象(Student)，并遍历。删除名字是"张三"的学生。
 */
public class test1 {
    public static void main(String[] args) {
        Collection Student = new ArrayList();
        Student.add("张三");
        Student.add("李四");
        Student.add("王五");
        System.out.println("Student: "+Student);
        Student.remove("张三");
        System.out.println("删除张三之后的Student: "+Student);
    }
}
